const connect = require('connect');
const morgan = require('morgan');
const url = require('url');

connect()
  .use(
    morgan.token('query-string', function (req, res) {
      return url.parse(req.url).query;
    })
  )
  .use(hello)
  .listen(3000);

function hello(req, res) {
  res.end('hello\n');
}
